﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="TourImageList.aspx.cs" Inherits="Admin_Tour_TourTypeList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  
    <%--------------------%><div class="header" style="width: 1080px; text-align: left">
            DANH SÁCH HÌNH ẢNH
            <div class="content-IE">
                  <div class="section-header">
       
        <div class="options">
            <a href="TourImageAE.aspx?TourId=<%=TourId %>">
                <div class="adminButtonBlue" style='float: left; text-align: center;'>
                    <p style='margin: 4px auto'>Thêm</p>
                </div>
            </a>&nbsp;
            <asp:Button ID="btnUpdateOrder" runat="server" CssClass="adminButtonBlue" Text="Cập nhật vị trí"
                ToolTip="Update Order" OnClick="btnUpdateOrder_Click" />
        </div>
    </div>

    <asp:GridView ID="grv" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="true"
        PageSize="15" CssClas="tablestyle" OnRowDeleting="grv_RowDeleting" OnPageIndexChanging="grv_PageIndexChanging">
        <HeaderStyle CssClass="headerstyle"></HeaderStyle>
        <RowStyle CssClass="rowstyle" />
        <AlternatingRowStyle CssClass="altrowstyle" />
        <Columns>
            <asp:TemplateField HeaderText="Stt" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%#Container.DataItemIndex +1 %>
                </ItemTemplate>
                <ItemStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hình ảnh">
                <ItemTemplate>
                    <%#Eval("Name")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Name">
                <ItemTemplate>
                    <img src="<%#Eval("ImageUrl")%>" alt="" style="width: 50px; height: 50px;" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Order" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                ItemStyle-VerticalAlign="Top">
                <ItemTemplate>
                    <asp:TextBox ID="txtOrder" runat="server" Text='<%#Eval("DisplayOrder") %>' Width="30"></asp:TextBox>
                    <asp:RequiredFieldValidator ControlToValidate="txtOrder" ID="RequiredFieldValidator1"
                        runat="server" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="*"
                        ControlToValidate="txtOrder" ValidationExpression="^([0-9]|[0-9][0-9]|[1][0][0])$"
                        ForeColor="Red"></asp:RegularExpressionValidator>
                    <asp:HiddenField ID="hdfID" runat="server" Value='<%#Eval("ID") %>' />
                    <asp:HiddenField ID="hdfTourId" runat="server" Value='<%#Eval("TourId") %>' />
                    <asp:HiddenField ID="hdfOrder" runat="server" Value='<%#Eval("DisplayOrder") %>' />
                </ItemTemplate>
                <ItemStyle Width="50px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="60px"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="TourImageAE.aspx?TourImageId=<%#Eval("Id") %>">
                        <img src='/images/ico-promotions.png' alt='' />
                        Edit</a><br />
                    <asp:LinkButton ID="lnkDelete" runat="server" CommandArgument='<%#Eval("Id") %>'
                        OnClientClick="return confirm('Bạn muốn xóa không?')" CommandName="Delete"><img src='/images/unchecked.gif' alt='' />Delete
                    </asp:LinkButton>
                </ItemTemplate>
                <ItemStyle VerticalAlign="Top" />
            </asp:TemplateField>
        </Columns>
        <PagerSettings PageButtonCount="50" Position="TopAndBottom" />
    </asp:GridView>
            </div>
            <div class="clear">
            </div>

    <%--------------------%>
</asp:Content>
